<template>
  <div class="m-item">
    <header class="floortitle">
      <span>爆款推荐</span>
    </header>
    <div class="bk_list">
      <div class="content" v-for="(item, index) in recommendList" :key="index">
        <div class="status">老铁推荐</div>
        <img :src="item.imgUrl" alt="" />
        <div class="cnt">
          <div class="name">
            <h1>{{ item.name }}</h1>
            <div class="txt">{{ item.content }}</div>
          </div>
          <div class="price">
            <span>￥{{ item.price }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      recommendList: [
        {
          id: 1,
          name: "龙井铁观音2號250g",
          content: "鲜爽甘醇 口粮首选",
          price: "68",
          imgUrl: "./images/recommend.jpeg",
        },
        {
          id: 1,
          name: "龙井铁观音2號250g",
          content: "鲜爽甘醇 口粮首选",
          price: "68",
          imgUrl: "./images/recommend.jpeg",
        },
        {
          id: 1,
          name: "龙井铁观音2號250g",
          content: "鲜爽甘醇 口粮首选",
          price: "68",
          imgUrl: "./images/recommend.jpeg",
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.m-item {
  width: 100vw;
  height: 13.82rem;
  .floortitle {
    position: relative;
    height: 0.7rem;
    text-align: center;
    padding: 0.2rem 0;
    font-size: 0.5rem;
    color: #333333;
    span::before {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: block;
      background: #d4c0a7;
      top: 50%;
      margin-top: -4px;
      right: 35%;
    }
    span::after {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: block;
      background: #d4c0a7;
      top: 50%;
      margin-top: -4px;
      left: 35%;
    }
  }
  .bk_list {
    box-sizing: border-box;
    padding: 0.2rem;
    .content {
      position: relative;
      width: 9.6rem;
      // height: 3.84rem;
      .cnt {
        padding-right: 0.4rem;
        top: 0;
        right: 0;
        position: absolute;
        display: flex;
        width: 5.0133rem;
        height: 3.84rem;
        box-sizing: border-box;
        font-size: 0.3733rem;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        .price {
          margin-top: 0.44rem;
          font-size: 0.5rem;
          color: #b0352f;
        }
      }
      img {
        width: 100%;
        height: 100%;
        border-radius: 0.2133rem;
      }
      .status {
        background: #d4c0a7;
        position: absolute;
        left: 0.4rem;
        top: 0;
        color: #fff;
        border-radius: 0 0 0.2133rem 0.2133rem;
        padding: 5px;
        font-size: 0.4rem;
      }
    }
  }
}
::v-deep h1 {
  // font-size: .3733rem;
  color: #666666;
  font-size: 0.34rem;
}
</style>